import pymysql

serverName='localhost'
userName='root'
passWord='0'
db='roam'
conn = pymysql.connect(host=serverName, port=3306, user=userName, passwd=passWord, db=db , charset='utf8')
cursor = conn.cursor()

sqlkey = "INSERT INTO `roam`.`roam_admin_info`(`admin_id`, `admin_acc`, `admin_pwd`) VALUES "
for i in range(1,5):
    admin_id =str(i)
    admin_acc="adminacc"+str(i)
    admin_pwd=str(i)+"21212345"
    sqlv="(%s, %s, %s)"
    cursor.execute(sqlkey+sqlv, (admin_id, admin_acc,admin_pwd))
    conn.commit()
print("执行完成")
conn.close()
cursor.close()